//============================================================================
// Name        : Complex.cpp
// Author      : tyong
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;
class Complex{
public:
	Complex(){real=0;imag=0;}
	Complex(double r,double i):real(r),imag(i){}
	Complex operator + (Complex &);
	void show();
private:
	double real;
	double imag;
};
Complex Complex::operator +(Complex &c){
	Complex c1;
	c1.real = real+c.real;
	c1.imag = imag+c.imag;

	return c1;
}
void Complex::show(){
	if(real<0&&imag>0){
			cout<<real<<"+"<<imag<<"i";
		}
		if(real<0&&imag<0){
			cout<<real<<imag<<"i";
		}
		if(real>0&&imag<0){
			cout<<real<<imag<<"i";
		}
		if(real>0&&imag>0){
			cout<<real<<"+"<<imag<<"i";
		}
	    if(real==0&&imag==0){
			cout<<"0;
		}
	     if(real==0&&imag!=0){
			cout<<imag<<"i";
		}
		if(real!=0&&imag==0){
			cout<<real;
		}
}

int main() {
	double real,imag;
	cin>>real>>imag;
	Complex c1(real,imag),c2(3.14,2.68),c3;

	c3=c1+c2;
	c3.show();
	return 0;
}
